<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>查询预警巡查任务基本信息</title>
</head>
<body>

<script src="./js/jquery-3.6.0.js"></script>


<script>
    $(function () {
        $.ajax({
            url: "/es/list",
            success: function (result) {
                let rows = result.data.rows;
                $("#accordion").append("<div><a href=\"index.html\">预警查询列表</a></div>");
                $("#accordion").append("<div><a href=\"inspectionlist.html\">巡查作务查询列表</a></div>");
                $("#accordion").append("<h1>预警任务共计："+(rows.length)+"条</h1>");
                for (x = 0; x < rows.length; x++) {
                    $("#accordion").append("<h3 id=\"taskHead" + (x + 1) + "\"" + ">预警任务" + (x + 1) + "/"+(rows.length)+" ：" + rows[x].projectName + "</h3><a href='/upload.html?id="+rows[x].alertId+"'>上传</a> ");
                    $("#accordion").append("<div id=\"taskId" + (x + 1) + "\"" + "><ul>" +
                        "<li>地址：" + rows[x].address + "</li>" +
                        "<li>编号：" + rows[x].alertId + "</li>" +
                        "<li>时间：" + rows[x].alertTime + "</li>" +
                        "<li>邮编：" + rows[x].areaCode + "</li>" +
                        "<li>地点：" + rows[x].areaName + "</li>" +
                        "<li>天数：" + rows[x].days + "</li>" +
                        "<li>项目：" + rows[x].projectName + "</li>" +
                        "<li>原因：" + rows[x].reason + "</li>" +
                        "<li>类型:" + rows[x].type + "</li>" +
                        "</ul></div>");
                }
            }
        });
    });

</script>
<div id="accordion">


</div>
</body>
</html>
